Skip to content

Conversation

@bnogas
Copy link
Contributor

@bnogas bnogas commented Nov 5, 2025

Summary

This PR upgrades py-spy to version 0.4.1.

Context

The previous version of py-spy had compatibility issues with Python 3.12, preventing pyroscope-io from properly attaching to subprocesses. As a result, only the main process was profiled, leading to incomplete performance data.

Fix

Version 0.4.1 addresses this issue, ensuring full support for profiling subprocesses under Python 3.12.
See the upstream issue for details: benfred/py-spy#726.

@bnogas bnogas requested review from a team as code owners November 5, 2025 01:11
@CLAassistant
Copy link

CLAassistant commented Nov 5, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@korniltsev-grafanista
Copy link
Contributor

may need to bump rust toolchain to fix CI

Cargo.lock Outdated
[[patch.unused]]
name = "py-spy"
version = "0.4.0"
source = "git+https://github.com/grafana/py-spy?rev=062d827#062d8279c15e949f507e22dce17414ab083ef477"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if git+https://github.com/grafana/ should be rebased against 0.4.1?

@bnogas
Copy link
Contributor Author

bnogas commented Nov 5, 2025

may need to bump rust toolchain to fix CI

I've bumped rust to 1.87, also I think that git+https://github.com/grafana/ may need to be re-based?

@korniltsev-grafanista
Copy link
Contributor

We need to check if we can remove the fork altogether if they fixed the panic with line numbers paraing

@bnogas
Copy link
Contributor Author

bnogas commented Nov 5, 2025

We need to check if we can remove the fork altogether if they fixed the panic with line numbers paraing

I’ve tested it without the patch, and it appears to work correctly with Python 3.12. I don’t have the exact repro steps, but the issue seems resolved upstream:
https://github.com/benfred/py-spy/commit/9ab9703c9b5fffe65d10f25ec5ddb86b0e045095

I’ve removed the patch from the PR.

@korniltsev-grafanista korniltsev-grafanista enabled auto-merge (squash) November 5, 2025 14:19
@korniltsev-grafanista korniltsev-grafanista merged commit c0bb396 into grafana:main Nov 5, 2025
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants